Skip to content

[FIX] SyntaxWarning due to escape characters in docstrings#1305

Open
lstolcman wants to merge 3 commits intoNixtla:mainfrom
lstolcman:syntaxwarning-invalid-escape
Open

[FIX] SyntaxWarning due to escape characters in docstrings#1305
lstolcman wants to merge 3 commits intoNixtla:mainfrom
lstolcman:syntaxwarning-invalid-escape

Conversation

@lstolcman
Copy link
Copy Markdown

@lstolcman lstolcman commented Mar 31, 2025

Due to changes in python 3.12, invalid escape characters raise SyntaxWarning.

A suggested solution from PEP 257 is to use raw-docstrings, which is applied in this PR:

Use r"""raw triple double quotes""" if you use any backslashes in your docstrings.

Relevant notebook were changed, and nbdev_export was executed to apply changes in python files.

Closes #1304

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 31, 2025

CLA assistant check
All committers have signed the CLA.

@elephaint
Copy link
Copy Markdown
Contributor

Thanks! I'll have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python 3.12: SyntaxWarning: invalid escape sequence

3 participants